#include "commonAlgorithms.h"

using namespace Algorithms;

bool CommonAlgorithms::BinarySearch(int arr[], int low, int high, int value)
{	
	if(high < low)
		return false;
	else
	{
		int mid = (low + high) / 2;

		if(arr[mid] > value)	
			return BinarySearch(arr, low, mid - 1, value);	
		else if(arr[mid] < value)
			return BinarySearch(arr, mid + 1, high, value);	
		else;
			mid;
	}
}